<?php

declare (strict_types=1);
namespace App\Model;

use App\Library\Common;

/**
 * @property int $id 
 * @property int $channel_id 频道id
 * @property int $link_id 关联id
 * @property int $type 1商品   2审核记录
 */
class LinkChannel extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fly_link_channel';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'channel_id' => 'integer', 'link_id' => 'integer', 'type' => 'integer'];

    /**
     * 获取完整路径.
     *
     * @param string $value
     * @return string
     * get驼峰字段名Attrbute
     */
    public function getUrlAttribute($value)
    {
        return Common::cdnurl($value);
    }
}